package com.example.demo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.example.demo.entity.Author;
import com.example.demo.util.PageUtil;

@Mapper
public interface AuthorMapper {

  Integer add(@Param("author") Author author);

  Integer update(@Param("author") Author author);

  Integer delete(@Param("id") int id);

  Author[] get(PageUtil pageUtil);

  Author[] getAll();

  Author[] findByName(@Param("name") String name, @Param("pageUtil") PageUtil pageUtil);

  int findByNameCount(@Param("name") String name);

}
